package com.punai.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.punai.common.core.domain.entity.EcoCompany;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EcoCompanyMapper extends BaseMapper<EcoCompany> {

    Integer getMaxSort();

    List<EcoCompany> selectCompanyList(EcoCompany company);

    EcoCompany selectCompanyById(String id);

    List<EcoCompany> selectCompanyAndChild(Long id);

    int selectNormalChildrenCompanyById(Long id);

    int hasChildByCompanyId(Long id);

    int checkCompanyExistUser(Long id);

    int deleteCompanyById(Long id);

    List<EcoCompany> selectChildrenCompanyById(Long id);

    void updateCompanyChildren(@Param("companys") List<EcoCompany> children);

    void updateCompanyStatusNormal(@Param("companyIds")Long[] companyIds);
}
